package com.example.springbootdemo.enableautoconfiguration;

import org.springframework.boot.autoconfigure.AutoConfigurationImportFilter;
import org.springframework.boot.autoconfigure.AutoConfigurationMetadata;

public class CustomAutoConfigurationImportFilter implements AutoConfigurationImportFilter {
    @Override
    public boolean[] match(String[] autoConfigurationClasses, AutoConfigurationMetadata autoConfigurationMetadata) {
        boolean[] matches = new boolean[autoConfigurationClasses.length];
        for(int i = 0; i < autoConfigurationClasses.length; i++) {
            if(!"com.example.springbootdemo.enableautoconfiguration.CustomAutoConfigurationFilter".equals(autoConfigurationClasses[i])) {
                matches[i] = true;
            }
        }
        return matches;
    }
}
